import request from '@/config/axios'

// OA 补卡申请 VO
export interface OaReissueCardApplyVO {
  id: number // 补卡申请表主键
  reissueDate: Date // 补卡日期
  reissueType: number // 补卡类型：1上班卡 2下班卡
  reason: string // 补卡原因
  status: number // 审批结果
  processInstanceId: string // 流程实例的编号
}

// OA 补卡申请 API
export const OaReissueCardApplyApi = {
  // 查询OA 补卡申请分页
  getOaReissueCardApplyPage: async (params: any) => {
    return await request.get({ url: `/bpm/oa-reissue-card-apply/page`, params })
  },

  // 查询OA 补卡申请详情
  getOaReissueCardApply: async (id: number) => {
    return await request.get({ url: `/bpm/oa-reissue-card-apply/get?id=` + id })
  },

  // 新增OA 补卡申请
  createOaReissueCardApply: async (data: OaReissueCardApplyVO) => {
    return await request.post({ url: `/bpm/oa-reissue-card-apply/create`, data })
  },

  // 修改OA 补卡申请
  updateOaReissueCardApply: async (data: OaReissueCardApplyVO) => {
    return await request.put({ url: `/bpm/oa-reissue-card-apply/update`, data })
  },

  // 删除OA 补卡申请
  deleteOaReissueCardApply: async (id: number) => {
    return await request.delete({ url: `/bpm/oa-reissue-card-apply/delete?id=` + id })
  },

  // 导出OA 补卡申请 Excel
  exportOaReissueCardApply: async (params) => {
    return await request.download({ url: `/bpm/oa-reissue-card-apply/export-excel`, params })
  },
}